<!--{*
/*
 * This file is part of EC-CUBE
 *
 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
 *
 * http://www.lockon.co.jp/
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
*}-->
<!--★★メインコンテンツ★★-->
<div id="alpha">
<div id="alpha-inner">
<!--▼SUB NAVI-->
<!--{include file=$tpl_subnavi}-->
<!--▲SUB NAVI-->
</div>
</div>



<div id="beta">
<div id="beta-inner">
<form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->" enctype="multipart/form-data">
<input type="hidden" name="mode" value="edit">
<input type="hidden" name="parent_category_id" value="<!--{$arrForm.parent_category_id}-->">
<input type="hidden" name="category_id" value="<!--{$arrForm.category_id}-->">
<div class="title_page">
<h2><!--{$tpl_subtitle}-->(最大<!--{$smarty.const.LEVEL_MAX}-->階層まで)</h2>
</div>



<div class="searchit">
<ul>
<li><a href="#" onclick="fnModeSubmit('csv','','');" >CSV DOWNLOAD</a>｜<a href="../contents/csv.php?tpl_subno_csv=category"> >>CSV出力項目設定</a>
</li>
</ul>
</div>



<div class="menuclass">
<table summary="カテゴリ設定">
<tr>
	<!--▼画面左-->
	<td valign="top" nowrap>
	<a href="<!--{$smarty.server.PHP_SELF|escape}-->">▼ホーム</a><br />
	<!--{section name=cnt loop=$arrTree}-->
	<!--{assign var=level value="`$arrTree[cnt].level`}-->

	<!--{* 上の階層表示の時にdivを閉じる *}-->
	<!--{assign var=close_cnt value="`$before_level-$level+1`}-->
	<!--{if $close_cnt > 0}-->
	<!--{section name=n loop=$close_cnt}--></div><!--{/section}-->
	<!--{/if}-->

	<!--{* スペース繰り返し *}-->
	<!--{section name=n loop=$level}-->　　<!--{/section}-->

	<!--{* カテゴリ名表示 *}-->
	<!--{assign var=disp_name value="`$arrTree[cnt].category_id`.`$arrTree[cnt].category_name`"}-->
	<!--{if $arrTree[cnt].level != $smarty.const.LEVEL_MAX}-->
	<a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="fnModeSubmit('tree', 'parent_category_id', <!--{$arrTree[cnt].category_id}-->); return false;">
		<!--{if $arrForm.parent_category_id == $arrTree[cnt].category_id}-->
		<img src="<!--{$smarty.const.URL_DIR}-->misc/openf.gif" />
		<!--{else}-->
		<img src="<!--{$smarty.const.URL_DIR}-->misc/closef.gif" />
		<!--{/if}-->
	<!--{$disp_name|escape}--></a><br />
	<!--{else}-->
	<img src="<!--{$smarty.const.URL_DIR}-->misc/closef.gif" />
	<!--{$disp_name|escape}--></a><br />
	<!--{/if}-->

		<!--{if $arrTree[cnt].display == true}-->
		<div id="f<!--{$arrTree[cnt].category_id}-->">
		<!--{else}-->
		<div id="f<!--{$arrTree[cnt].category_id}-->" style="display:none">
		<!--{/if}-->
		<!--{assign var=before_level value="`$arrTree[cnt].level`}-->
	<!--{/section}-->
	</td>

	<!--▼画面右-->
	<td valign="top">
	<span class="red12"><!--{$arrErr.category_name}--></span>
	<input type="text" name="category_name" value="<!--{$arrForm.category_name|escape}-->" size="30" class="box30" maxlength="<!--{$smarty.const.STEXT_LEN}-->"/>
	<input type="submit" name="button" value="登録"/>
	<span class="red10"> （上限<!--{$smarty.const.STEXT_LEN}-->文字）</span>
	
	<!--{*
	<textarea name="category_info" cols="80" rows="10"><!--{$arrForm.category_info|escape}--></textarea><br />
	<!--{if $arrForm.level != "1" && $arrForm.parent_category_id != "0"}-->
	<input type="checkbox" name="info_flg" id="info_flg" value="1"<!--{if $arrForm.info_flg}--> checked="checked"<!--{/if}--> />
	<label for="info_flg">親カテゴリの説明を引き継ぐ</label>
	<!--{/if}-->
	<span class="red10"> （上限<!--{$smarty.const.LLTEXT_LEN}-->文字）</span>
	 *}-->


		<!--{if count($arrList) > 0}-->
		<br />
		<table summary="カテゴリ設定">
		<tr align="center">
		<th>ID</th><th>カテゴリ名</th><th>編集</th><th>削除</th><th>移動</th>
		</tr>
		<!--{section name=cnt loop=$arrList}-->
		<tr bgcolor="<!--{if $arrForm.category_id != $arrList[cnt].category_id}-->#ffffff<!--{else}--><!--{$smarty.const.SELECT_RGB}--><!--{/if}-->" align="left">
			<td><!--{$arrList[cnt].category_id}--></td>
			<td>
			<!--{if $arrList[cnt].level != $smarty.const.LEVEL_MAX}-->
			<a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="fnModeSubmit('tree', 'parent_category_id', <!--{$arrList[cnt].category_id}-->); return false"><!--{$arrList[cnt].category_name|escape}--></a>
			</td>
			<!--{else}-->
			<!--{$arrList[cnt].category_name|escape}-->
			<!--{/if}-->
		<td align="center">
		<!--{if $arrForm.category_id != $arrList[cnt].category_id}-->
		<a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="fnModeSubmit('pre_edit', 'category_id', <!--{$arrList[cnt].category_id}-->); return false;" />編集</a>
		<!--{else}-->
		編集中
		<!--{/if}-->
		</td>
		<td align="center">
		<a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="fnModeSubmit('delete', 'category_id', <!--{$arrList[cnt].category_id}-->); return false;" />削除</a>
		</td>
		<td align="center">
		<!--{* 移動 *}-->
		<!--{if $smarty.section.cnt.iteration != 1}-->
		<a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="fnModeSubmit('up','category_id', <!--{$arrList[cnt].category_id}-->); return false;">上へ</a>
		<!--{/if}-->
		<!--{if $smarty.section.cnt.iteration != $smarty.section.cnt.last}-->
		<a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="fnModeSubmit('down','category_id', <!--{$arrList[cnt].category_id}-->); return false;">下へ</a>
		<!--{/if}-->
		</td>
		</tr>
		<!--{/section}-->
		</table>

		<!--{else}-->
		<div class="nodata">
		<p>この階層には、カテゴリが登録されていません。</p>
		</div>
		<!--{/if}-->

	</td>
	</tr>
</table>
</div>


</form>
</div>
</div>
